package com.luzhikun.Listener.httpSessionListener;

import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;

/**
 * @Author Rookie Coder
 * @Description 八大监听器之HttpSessionAttributeListener
 * @Date
 **/
public class ServletSessionAttributeListener implements HttpSessionAttributeListener {

    // session会话域属性空间属性添加
    @Override
    public void attributeAdded(HttpSessionBindingEvent event) {
        System.out.println("删除了" + event.getName() + "==" + event.getValue());
    }

    // session会话域属性空间属性删除
    @Override
    public void attributeRemoved(HttpSessionBindingEvent event) {
        System.out.println("删除了" + event.getName() + "==" + event.getValue());
    }

    // session会话域属性空间属性修改
    @Override
    public void attributeReplaced(HttpSessionBindingEvent event) {
        System.out.println("删除了" + event.getName() + "==" + event.getValue());
    }
}
